import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
class CommonUtils{

  static Future showToast(BuildContext context,String msg)=> Fluttertoast.showToast(
      msg: msg,
      gravity: ToastGravity.BOTTOM,
      toastLength: Toast.LENGTH_SHORT,
      timeInSecForIos: 1,
    );

  static bool isPhone (String phone){
    if (phone==null||phone.length==0) {
      return false;
    }
    if (phone.length != 11) {
      return false;
    }

    return phone.startsWith("1");
  }
}
